<!DOCTYPE html>
<html lang="<?php echo Configure::read('Config.lang'); ?>">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <?php echo $this->html->charset('utf-8'); ?>
    <title><?php echo $title_for_layout; ?></title>
    <?php if (isset($meta_description)) { ?>
    	<meta name="description" content="<?php echo $meta_description; ?>" />
    <?php } else { ?>
	    <meta name="description" content="" />
    <?php } ?>
    <link href="//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
    <?php
        echo $this->Html->meta('icon');
		
		// CSS
        echo $this->Html->css('heroic-features');
        echo $this->Html->css('famfamfam-flags');
        echo $this->Html->css('jquery.dataTables');
        // css della libreria humane.js
        echo $this->Html->css('theme/original');
        echo $this->Html->css('select2');
        echo $this->Html->css('custom');
        echo $this->Html->css('animate.min');
		// bootstrap
        echo $this->Html->css('bootstrap.min');
		
		// JAVASCRIPT

        // TODO se internet explorer 9 inserisco il seguente script
        echo $this->Html->script('humane.min');
		// jquery
		echo $this->Html->script('jquery-1.10.1');
		// https://github.com/ivaynberg/select2/archive/3.5.1.zip#
        echo $this->Html->script('select2');
		
        echo $this->Html->script('jquery.dataTables.min');
        // per la gestione del timer
        echo $this->Html->script('jquery.timer');
        // script proprietario
        echo $this->Html->script('utility');
		// loader js
        echo $this->Html->script('load');
		// bootstrap
        echo $this->Html->script('bootstrap.min');
		
		//---------------------------------------------

        echo $this->fetch('meta');
        echo $this->fetch('css');
        echo $this->fetch('script');
    ?>
    
</head>
<body>
    
    <?php echo $this->element('header'); ?>       
    <?php echo $this->element('top_menu',array("utente"=>$this->Session->read("Auth.User"))); ?>        
    
    <div id="container" style="" class="animated fadeIn container-fluid">
		<div id="content" class="container" style="width: 100%;">
			<div class="row">
	            <ul class="breadcrumb">
	                <li>
	                  <a href="<?php echo $this->webroot; ?>">Home</a>
	                </li>
	                <li>
				        <a onclick="javascript:history.go(-1);"><?php echo __("Pagina Precedente")?></a> <span class="divider"></span>  
	                </li>
	                <?php if(isset($breadcrumb)) { ?>
	                    <li>
	                      <?php echo $breadcrumb; ?>
	                    </li>
	                <?php } ?>
	                
	                <div class="pull-right">
	                    <span class="fa-stack fa-lg">
	                      <i class="fa fa-circle fa-stack-2x"></i>
	                      <i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
	                    </span>
	                    <span class="fa-stack fa-lg">
	                      <i class="fa fa-circle fa-stack-2x"></i>
	                      <i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
	                    </span>
	                    <span class="fa-stack fa-lg">
	                      <i class="fa fa-circle fa-stack-2x"></i>
	                      <i class="fa fa-pinterest fa-stack-1x fa-inverse"></i>
	                    </span>
	                 </div>
	            </ul>
            </div>
            <div class="row">
                <div class="col-md-12" style="padding-left: 20px;padding-right: 10px;">
	            	<?php echo $this->fetch('content'); ?>
                </div>
            </div>
            <div class="row" style="text-align: center;margin-top: 50px;padding-top:20px;padding-bottom:20px;background: #ccc;">
				<?php echo $this->element('footer'); ?>
            </div>
        </div>
    </div>

    <?php echo $this->element('message'); ?>

</body>

</html>
